package top.ed333.mcplugins.configurableevents.requirement;

import org.bukkit.event.Event;
import org.jetbrains.annotations.NotNull;
import top.ed333.mcplugins.configurableevents.handler.Handler;

public abstract class ReqGroup {
    private final String groupName;
    private final Object ext;

    public ReqGroup(@NotNull String groupName, @NotNull Object ext) {
        this.groupName = groupName;
        this.ext = ext;
    }

    /**
     * 判断所触发的事件是否达到了执行条件
     * @param event 所触发的事件
     * @return true or false
     */
    public abstract boolean checkReq(@NotNull Event event);

    public abstract String name();

    public @NotNull String getGroupName() {
        return groupName;
    }

    public @NotNull Object getExt() {
        return ext;
    }
}
